
var textArr = [];

var casper = require('casper').create();

function page() {
    var arr = document.querySelectorAll('#content div tr a');
    console.log(arr.length)
    for (var i = 0; i < arr.length; i++) {
        textArr[i] = arr[i].text;
    }
}

casper.start('http://app1.nmpa.gov.cn/datasearchcnda/face3/base.jsp?tableName=TABLE25&title=%E5%9B%BD%E4%BA%A7%E8%8D%AF%E5%93%81&bcId=152904713761213296322795806604');

casper.then(function () {
    this.wait(10000, function () {
        this.echo(this.getHTML());
    })
});

casper.run(function () {
//    this.echo(textArr.length + ' links found:');
//    this.echo(' - ' + textArr.join('\n - '));
    this.echo('End.');
    this.exit();
});